
const obj1 = {
    num:1,
    string:'string,' ,
    obj:{
        num:1,
        string:'string'
    },
    arr:[1,2]
}



const obj2 = Object.assign({},obj1)


obj2.obj.num = 2
console.log(obj1.obj.num)  // 2
console.log(obj2.obj.num)  // 2
